package com.ys.erp.stage_mall_service.bean.condition;

import com.ys.erp.framework.condition.BasePageCondition;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author lwj
 * @date 2025/5/21
 */
@Data
public class AfterSaleCondition {

    @Data
    @Schema(description = "到店付订单退款请求对象")
    public static class RefundToShopOrderCon {

        @NotBlank
        @Schema(description = "订单编号")
        private String orderNo;

        @Valid
        @Size(min = 1)
        @NotNull
        @Schema(description = "订单商品集")
        private List<RefundToShopOrderGoodsCon> goodsList;

    }

    @Data
    @Schema(description = "到店付订单退款商品请求对象")
    public static class RefundToShopOrderGoodsCon {

        @NotNull
        @Schema(description = "商品id")
        private Long orderGoodsId;

        @Min(1)
        @NotNull
        @Schema(description = "退款数量")
        private Integer num;

    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class PageOrderAfterSaleCon extends BasePageCondition {

        @Schema(description = "状态筛选")
        private Integer status;

    }

    @Data
    @Schema(description = "通过售后单退还幺豆请求对象")
    public static class RefundPulseByAfterSaleCon {

        @NotNull
        @Schema(description = "售后单ID")
        private Long afterSaleId;

        @Schema(description = "退还备注")
        private String remark;

    }

}
